This invention relates to a numercial control (NC) program generating apparatus which generates an NC program of machining commands suitable for finishing or roughing machining.
FIG. 1, consisting of FIGS. 1A and 1B, is a block diagram illustrating an embodiment of a prior art NC program generating apparatus which comprises an input means such as a keyboard 1, a data processing section 2, a roughing step processing section 3, a finishing step processing section 4 and an NC program processing section 5.
In the data processing section 2, by manipulation of the keyboard 1 by an operator, a blank shape G1 such as the one shown in FIG. 2 is inputted to a blank shape inputting section 21, and the blank shape G1 is stored in a blank shape memory 22 as a pattern composed of a series of shape elements such as points, straight lines and arcs. By another manipulation on the keyboard 1 by the operator a part shape G2 of FIG. 2 is inputted to a part shape inputting section 25, and is stored in a part shape memory 26 as a pattern composed of a series of shape elements. By still another manupulation on the keyboard 1 by the operator, a finishing stock G3 is inputted to a shape with finishing with generating section 23 for forming a shape with finishing stock as shown in FIG. 2, and the part shape G2 which has been stored in the part shape memory 26 and the blank shape G1 which has been stored in the blank shape memory 22 are read out, and a shape G4 with finishing stock as shown in FIG. 2 is obtained by offsetting the part shape G2 by the finishing stock G3, and is stored in a shape with finishing stock memory 24. By the operator's manipulation of the keyboard 1, information on one or more tools which are required for machining is inputted to a tool information input section 27 and stored in a tool information memory 28. The information comprises tool the tool angle, lip angle, and tip radius, machining conditions such as cutting speed, feed speed and clearance, and tool number and tool correction number.
In the roughing step processing section 3, the shape G4 with finishing stock stored in the shape with finishing stock memory 24, the blank shape G1 in the blank shape memory 22 and the tool information in the tool information memory 28 are read out at a roughing area dividing section 31 to obtain a roughing area by subtracting the shape G4 with finishing stock from the blank shape G1, to be suitable divided into sections based on the tool information, and stored in a divided roughing area memory 32 for divided roughing area. The roughing area divided into sections as shown in FIG. 3 comprises the blank shape G1, the shape G4 with finishing stock, dividing lines G5 and G6, roughing areas G7, G8, and G9 for each roughing step and information on the tools to be used in each step, machining direction and order of the step. The roughing area divided into sections and stored in the dixide roughing area memory 32 is read out at a roughing command generating section 33 for each step, and roughing commands H1, H2 and H3 for each step of FIG. 4 are formed based on the read out information and are stored at a roughing command memory 34. Simultaneously, blank commands H4, H5 and H6 for each step are formed and stored at a blank command memory 35. In order to obtain the roughing command and the blank command for a particular step, the shape obtained by removing all the sections which are supposed to have been completed before the step in question from the roughing area divided into sections as shown in FIG. 3 is assumed as the shape before machining, and the shape obtained by removing from the above shape before machining the section to be machined by the step in question is assumed as the shape after machining. Among the boundary lines defining the section to be machined by the step in question, those included in the shape before machining are determined as the blank command while those included in the shape after machining are determined as the roughing command. In other words, among the boundary lines of the section to be machined by the step in question, the blank shape is considered as the blank command, and the shape with finishing stock is considered as the roughing command. Further, as for the adjacent sections divided by a dividing line, the dividing line is considered as the roughing command for the section which is completed first, and the same dividing line is considered as the blank command for the section to be completed later.
In the finishing step processing section 4, the part shape G2 stored at the part shape memory 26, the shape G4 with finishing stock stored at the shape memory 24, and the tool information stored at the tool information memory 28 are read out by a finishing area dividing section 41 to obtain the finishing area by subtracting the part shape G2 from the shape G4 with finishing stock. The finishing area is divided suitable based on the tool information, and stored in a divided finishing area memory 42 for a divided finishing area. As shown in FIG. 5, the divided finishing area comprises shapes G4 and G2, the dividing points G10, G11, G12, sections G13, G14, G15, G16 for respective finishing steps and information such as on tools to be used at respective steps, machining direction and order of step. These divided sections of the finishing area stored in the divided finishing area memory 42 are read out by a finishing command generating section 43 for forming finishing commands H7, H8, H9, H10 for each step as shown in FIG. 6 and stored in a memory 44 for finishing command. When zero is inputted as the finish stock to the shape generating section 23, the finishing step processing section 4 is not actuated and hence, no machining command is formed.
In the NC program processing section 5, the roughing commands H1, H2, and H3 stored in the roughing command memory 34 and the blank commands H4, H5, and H6 stored in the blank command memory 35 are read out in the order of the steps by an NC program generating section 51 to form NC programs for the roughing cycle which feeds a cutter for a given amount repeatedly toward a machining area designated by the roughing command and the blank command and for the tip radius correction function which gives a command to move the tool so that the cutter tip of the tool having a certain radius comes to contact with the designated path, to be stored at an NC program memory 52. The finishing commands H7, H8, H9, and H10 stored in the finishing command memory 44 are read out in the order of the steps by the NC program generating section 51 to form NC programs for instructing the finishing and tip radius correction function to be stored in the NC program memory 52. The formed NC programs are outputted to a suitable medium such as a magnetic disc 6, a printer 7 or a paper tape 8 via an NC program outputting section 53. The roughing cycle and the tip radius correction function will now be described below.
As shown in FIG. 7, when the NC programs for the finishing command H11 comprising the points P1 through P4 and for the tip radius correction function are inputted to an NC machining system which machines works in accordance with such NC programs, a tool is positioned at the position T1, and a virtual circle S of the cutter tip with a radius R which is the tip radius and a center TC is moved in contact with the path designated by the finishing command H11 to complete the machining at the position T4 via the position T3.
As shown in FIG. 8, when the NC program instructing the roughing cycle comprising the roughing command H12 composed of the points P11 through P15 and the blank command H13 composed of the points P11, P16, P15 and the tip radius correction function are inputted, the work is machined based on the cut depth D, the tip radius R and the clearance C along the tool path CP1 composed of the points P24, P22 and P15, the tool path CP2 composed of the points P23, P21, P13, P14 and P22 and the tool path CP3 composed of the points P11, P12, P13, P14 and P15 sequentially. The movement of the tool along the paths is similar to the one described in relation to FIG. 7 for the finishing command H11.
However, the prior art NC program information generating system is not free of defects. Because machining and blank commands are formed by extracting from the boundary lines of divided sections in a machining area, a tool tends to collide with the shape before machining when the tool is positioned at the start or the ene point of a machining command, the work is cut too deep where the shape after machining has an inward bend, fins are produced where the shape after machining has an outward bend, or the work is not cut sufficiently when the machining command includes dividing lines.